package com.example.provider;

import android.database.sqlite.SQLiteDatabase;

public class TblInfoSong {

	// tables name
	public static final String TABLE_NAME1 = "ratingSong";

	// Common column names
	public static final String ID = "_id";
	// SONG Table- columns name
	public static final String SONG_ID = "song_id";
	public static final String SONG_RATING = "_rating";

	private static String createData() {
		StringBuilder sBuiler = new StringBuilder();
		sBuiler.append("create table " + TABLE_NAME1 + " (");
		sBuiler.append(ID + " integer primary key autoincrement, ");
		sBuiler.append(SONG_ID + " integer, ");
		sBuiler.append(SONG_RATING + " integer);");
		return sBuiler.toString();
	}
	public static void onCreate(SQLiteDatabase database) {
		database.execSQL(createData());
	}
	public static void onUpgrade(SQLiteDatabase database, int oldVersion,
			int newVersion) {
		database.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME1);
		onCreate(database);
	}
}